/* 
   Simple Vector4 class that handles rotations, translations,
   and scales.  Can also reset to default (0.f,0.f,0.f,0.f).

   Written by: Peter Ingulli
*/

#ifndef __VECTOR4_H
#define __VECTOR4_H

#include <iostream>
#include <string>

class Vector4
{
private:
	float _v[4];

public:
	Vector4();
	Vector4(float x, float y, float z);
	Vector4(float x, float y, float z, float w);

	float& operator[](int i) { return _v[i]; }
	float& operator()(int i) { return _v[i]; }
	void operator=(Vector4 v);
	Vector4 operator+(Vector4 v);

	void set_x(float x){ _v[0] = x; }
	void set_y(float y){ _v[1] = y; }
	void set_z(float z){ _v[2] = z; }
	void set_w(float w){ _v[3] = w; }

	void set(int i, float f){ _v[i] = f;}

	float get(int i){ return _v[i];}
	
	void scale(float s);

	void reset();
	
	float dot(Vector4 v);
	float dot(float v[4]);
	
	void print();
	void println();
};


#endif